//
//  InquiryPriceViewController.m
//  NewApp
//
//  Created by  on 12-7-9.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "InquiryPriceViewController.h"
#import "InquiryPriceDetailsViewController.h"
#import "InquiryPriceSearchResultViewController.h"

@interface InquiryPriceViewController ()

@end

@implementation InquiryPriceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //self.tableView.separatorStyle
//    self.tableView.separatorColor = [UIColor clearColor];//[UIColor colorWithRed:49.f/255.f green:105.f/255.f blue:154.f/255.f alpha:1.f];;
}

- (void) dealloc {
    [super dealloc];
}

- (void) loadRequest {
    [self.engine inquiryPriceInfos];
}

- (void) viewDetailsWithCategory:(NACategory *)cat {
    if (nil == cat) 
        return;
    self.title = @"返回";
    InquiryPriceDetailsViewController *viewCtrl = [[InquiryPriceDetailsViewController alloc] initWithCategory:cat];
    [self.navigationController pushViewController:viewCtrl animated:YES];
    [viewCtrl release]; 
}

- (void) searchButtonDidPressed {
    if (_searchBar.keywordTextfield.text.length == 0) 
        return;
    self.title = @"返回";
    InquiryPriceSearchResultViewController *viewCtrl = [[InquiryPriceSearchResultViewController alloc] initWithID:nil keyword:_searchBar.keywordTextfield.text];
    [self.navigationController pushViewController:viewCtrl animated:YES];
    [viewCtrl release];
}


@end
